import { COLUMN_WIDTH } from '@/utils/service.js'
// import { dateFormat } from '@/utils/date'

export const createColumns = (vm) => [
  {
    title: '序号',
    key: 'id',
    align: 'center',
    width: 80,
    render(h, params) {
      return (
        <div class={['serial-rect', 'serial-rect' + (params.index + 1)]}>
          {(vm.formData.pageNo - 1) * vm.formData.pageSize + params.index + 1}
        </div>
      )
    },
  },
  { title: '单位名称', key: 'organ', align: 'center' },
  { title: '供稿量', key: 'articleCount', align: 'center' },
  { title: '点击总量', key: 'clickAllCount', align: 'center', sortable: 'custom', sortType: 'desc' },
  { title: '点赞总量', key: 'likeCntAll', align: 'center', sortable: 'custom' },
  { title: '转发总量', key: 'forwardNumAll', align: 'center', sortable: 'custom'  },
  { title: '评论总量', key: 'replyCntAll', align: 'center', sortable: 'custom' },
  { title: '收藏总量', key: 'collectNumAll', align: 'center', sortable: 'custom'  },
]
